home *** CD-ROM | disk | FTP | other *** search
- /** $VER: sclib_guide 1.0 (15.2.93)
- **
- ** A simple TTX interface to SAS/C library documentation.
- **
- ** Written by Kari Sutela
- **/
-
- options results
- 'GetWord'
- if result = '' then do
- 'SetStatusBar No current word'
- exit
- end
- word = result
- /* First try 'word()' */
- function = word || '()'
- if ~moveto(function) then do
- /* Didn't work, try word by itself (might be a data item) */
- if ~moveto(word) then do
- 'SetStatusBar "'word'" not documented'
- end
- end
- exit
-
- moveto: PROCEDURE
- parse arg word
-
- oldaddr = address()
- /* Is the "correct" amigaguide already running? */
- if ~show('Ports','AMIGAGUIDE.LIB') then do
- /* Nope. Try to run it */
- address command 'run <nil: >nil: sc:c/amigaguide <nil: >nil: sc:help/sc_lib.guide portname AMIGAGUIDE.LIB'
- if rc ~= 0 then do
- 'SetStatusBar Unable to load amigaguide'
- exit
- end
- address command 'WaitForPort AMIGAGUIDE.LIB'
- if rc ~= 0 then do
- 'SetStatusBar Unable to load amigaguide'
- exit
- end
- end
- /* Now it is! */
- address AMIGAGUIDE.LIB
- 'link' word
- success = (rc = 0)
- address value oldaddr
- if success then 'ActivateWindow'
- return success
-